<div class="panel panel-default panel-intro">
    {:build_heading()}
    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <div class="alert alert-info">
                    <h4><i class="fa fa-info-circle"></i> 成本数据生成</h4>
                    <p>此功能将为现有的订单和生产计划生成成本数据，包括：</p>
                    <ul>
                        <li>订单成本数据（材料成本、人工成本、制造费用等）</li>
                        <li>计划成本数据（计划成本与实际成本对比）</li>
                        <li>成本差异分析数据</li>
                    </ul>
                    <p><strong>注意：</strong>此操作会生成测试数据，请确认后再执行。</p>
                </div>
                
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title">数据统计</h3>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-md-3">
                                <div class="info-box">
                                    <span class="info-box-icon bg-blue"><i class="fa fa-file-text-o"></i></span>
                                    <div class="info-box-content">
                                        <span class="info-box-text">订单数量</span>
                                        <span class="info-box-number" id="order_count">{$orderCount|default=0}</span>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="info-box">
                                    <span class="info-box-icon bg-green"><i class="fa fa-calendar"></i></span>
                                    <div class="info-box-content">
                                        <span class="info-box-text">生产计划</span>
                                        <span class="info-box-number" id="plan_count">{$planCount|default=0}</span>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="info-box">
                                    <span class="info-box-icon bg-yellow"><i class="fa fa-money"></i></span>
                                    <div class="info-box-content">
                                        <span class="info-box-text">已有成本数据</span>
                                        <span class="info-box-number" id="cost_count">{$costCount|default=0}</span>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="info-box">
                                    <span class="info-box-icon bg-red"><i class="fa fa-exclamation-triangle"></i></span>
                                    <div class="info-box-content">
                                        <span class="info-box-text">差异数据</span>
                                        <span class="info-box-number" id="variance_count">{$varianceCount|default=0}</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="box box-warning">
                    <div class="box-header with-border">
                        <h3 class="box-title">生成操作</h3>
                    </div>
                    <div class="box-body">
                        <form id="generate-form" role="form" data-toggle="validator" method="POST" action="">
                            <div class="form-group">
                                <label>生成选项：</label>
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" name="generate_order_cost" value="1" checked> 生成订单成本数据
                                    </label>
                                </div>
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" name="generate_plan_cost" value="1" checked> 生成计划成本数据
                                    </label>
                                </div>
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" name="generate_variance" value="1" checked> 生成成本差异数据
                                    </label>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label>数据范围：</label>
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="data_range" value="all" checked> 所有数据
                                    </label>
                                </div>
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="data_range" value="recent"> 最近30天
                                    </label>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary btn-lg">
                                    <i class="fa fa-magic"></i> 开始生成数据
                                </button>
                                <button type="button" class="btn btn-default btn-lg" onclick="history.back()">
                                    <i class="fa fa-arrow-left"></i> 返回
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
